<?php
/*
	申请设置
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	if($_RQ['postdata']){
		$post=get_postdata();
		$setting=array(
			'max_num'=>intval($post['max_num']),
			'dispatch'=>intval($post['dispatch']),
			'desc'=>trim($post['desc']),
		);
		$this->plugin_setting('apply',$setting);
		exi('设置成功！');
	}
	$setting=$this->plugin_setting('apply');
	$return['item']=$setting;
	$return['htmls']=array(
		'type'=>'edit',
		'edit'=>array(
			array('type'=>'string','name'=>'max_num','title'=>'最大申请数','help'=>'每位车主最多可以申请挪车卡数量'),
			//array('type'=>'string','name'=>'dispatch','title'=>'邮费','help'=>'邮寄费用'),
			array('type'=>'text','name'=>'desc','title'=>'申请说明','help'=>'关于挪车卡对申请者的一些说明'),
		),
	);
	exi($return);
}